import http from "@/api/http";

export function getPage(query: object) {
  return http.get({
    url: "/content/article/category/page",
    params: query
  });
}

export function getAll() {
  return http.get({
    url: "/content/article/category"
  });
}

export function getCategory(id: number) {
  return http.get({
    url: "/content/article/category/" + id
  });
}

export function saveCategory(obj: object) {
  return http.post({
    url: "/content/article/category",
    data: obj
  });
}

export function updateCategory(obj: object) {
  return http.put({
    url: "/content/article/category",
    data: obj
  });
}

export function delCategorys(ids: any) {
  return http.delete({
    url: "/content/article/category/" + ids
  });
}
